
package com.insigma.business.qrcode.soldier._bff.impl;

import cn.hutool.core.bean.BeanUtil;
import com.google.common.collect.Sets;
import com.insigma.business.qrcode.common._consumer.CommonAdminAreaConsumer;
import com.insigma.business.qrcode.common.dto.CommonAdminAreaDTO;
import com.insigma.business.qrcode.common.dto.ErrorCodeEnum;
import com.insigma.business.qrcode.common.template.BasePagingResponse;
import com.insigma.business.qrcode.common.template.area.BaseProviderImpl;
import com.insigma.business.qrcode.common.template.area.ScenarioCodeEnum;
import com.insigma.business.qrcode.common.template.area.ServiceCallback;
import com.insigma.business.qrcode.common.util.*;
import com.insigma.business.qrcode.common.vo.*;
import com.insigma.business.qrcode.soldier._bff.SoldierBasicInfoBffProvider;
import com.insigma.business.qrcode.soldier._consumer.SoldierBasicInfoConsumer;
import com.insigma.business.qrcode.soldier._consumer.SoldierConsumer;
import com.insigma.business.qrcode.soldier._consumer.SoldierDisabledInfoConsumer;
import com.insigma.business.qrcode.soldier.dto.*;
import com.insigma.business.qrcode.soldier.dto.request.PetitionInsertRequest;
import com.insigma.business.qrcode.soldier.dto.request.SoldierJxSendMessageRequestRequest;
import com.insigma.business.qrcode.soldier.entity.*;
import com.insigma.business.qrcode.soldier.request.*;
import com.insigma.business.qrcode.soldier.util.RedisLock;
import com.insigma.business.qrcode.welfare._consumer.ScanCodeRecordConsumer;
import com.insigma.business.qrcode.welfare.request.ScanCodeRecordInsertRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;

import java.util.HashSet;
import java.util.List;


@Slf4j
@Service
@Component("soldierBasicInfoBffProvider")
public class SoldierBasicInfoBffProviderImpl extends BaseProviderImpl implements SoldierBasicInfoBffProvider {

    @Autowired
    private SoldierBasicInfoConsumer soldierBasicInfoConsumer;
    @Autowired
    private SoldierDisabledInfoConsumer soldierDisabledInfoConsumer;
    @Autowired
    private CommonAdminAreaConsumer adminAreaConsumer;
    @Autowired
    private SoldierConsumer soldierConsumer;

    @Autowired
    private CommonAdminAreaConsumer commonAdminAreaConsumer;

    @Autowired
    private ScanCodeRecordConsumer scanCodeRecordConsumer;

//    @Autowired
//    private CommonAliShhConsumer commonAliShhConsumer;
//
//    @Autowired
//    private GovEmployeeConsumer govEmployeeConsumer;
//
//    @Autowired
//    private OperationLogService operationLogService;

    @Autowired
    private RedisLock redisLock;

    private String hospitalLockPrefix = "hospital:dr:";

    @Override
    public BaseResponse<HealthStatsDTO> statsHealth(SoldierBasicInfoSearchRequest searchRequest) {
        searchRequest.setAdminAreaCode(commonAdminAreaConsumer.checkIsChildAdminAreaCode(searchRequest.getAdminAreaCode()));
        return soldierBasicInfoConsumer.statsHealth(searchRequest);
    }


    @Override
    public BasePagingResponse<List<SoldierBasicInfoDTO>> searchSoldierBasicInfo(final SoldierBasicInfoSearchRequest searchRequest) {


        final BasePagingResponse<List<SoldierBasicInfoDTO>> basePagingResponse = new BasePagingResponse<>();
        serviceTemplate.execute(basePagingResponse, new ServiceCallback() {
            @Override
            public void check() {
                BizCheckUtil.checkNotNull(searchRequest, "查询分页SoldierBasicInfo的请求参数不能为空");
            }

            @Override
            public void executeService() {
                searchRequest.setEmployeeId(SessionUtils.getGovUserId());
                searchRequest.setAdminAreaCode(commonAdminAreaConsumer.checkIsChildAdminAreaCode(searchRequest.getAdminAreaCode()));
                BasePagingResponse<List<SoldierBasicInfoDTO>> listBasePagingResponse = soldierBasicInfoConsumer.searchSoldierBasicInfo(searchRequest);
                BeanUtil.copyProperties(listBasePagingResponse, basePagingResponse);
            }

            @Override
            public ScenarioCodeEnum getScenarioEnum() {
                return ScenarioCodeEnum.SOLDIER_BASIC_INFO_SEARCH;
            }
        });

        return basePagingResponse;
    }

    @Override
    public BaseResponse<SoldierBasicInfoDTO> getSoldierBasicInfo(SoldierBasicInfoSearchRequest request) {

        BizCheckUtil.checkNotNull(request, "请求参数不能为空");
        BizCheckUtil.checkIDCardNO(request.getIdCardNo());
        SessionGovEmployee sessionGovEmployee = RpcContextUtil.getSessionGovEmployee();

        final BaseResponse<SoldierBasicInfoDTO> soldierBasicInfoResponse =
                soldierBasicInfoConsumer.getSoldierBasicInfo(request.getIdCardNo());
        if (soldierBasicInfoResponse == null) {
            return ResponseUtil.setupFailedResponse(new BaseResponse(), ErrorCodeEnum.COMMON_INNER_ERROR);
        }
//        if ("YRYD".equals(request.getSourceLog())) {
//            if (sessionGovEmployee != null) {
//                GovEmployeeDTO dto = govEmployeeConsumer.getRoles(sessionGovEmployee.getUserId()).getDto();
//                if (dto != null) {
//                    OperationLogDO operationLogDO = new OperationLogDO();
//                    operationLogDO.setName("查看档案");
//                    operationLogDO.setModule("一人一档");
//
//                    operationLogDO.setStatus(true);
//                    operationLogDO.setRemark(String.format("%s查看了%s的档案。", dto.getRealName(), soldierBasicInfoResponse.getDto().getRealName()));
//                    operationLogDO.setUserId(sessionGovEmployee.getUserId());
//                    operationLogDO.setUserType(sessionGovEmployee.getUserType());
//                    operationLogDO.setDisplayed(true);
//                    operationLogDO.setUserName(dto.getRealName());
//                    operationLogDO.setMobile(dto.getMobile());
//                    operationLogDO.setRole(dto.getRoleNames());
//                    operationLogDO.setAdminAreaCode(dto.getAdminAreaCode());
//                    operationLogService.insert(operationLogDO);
//                    log.info("新增操作日志，{}", operationLogDO);
//                }
//            }
//        }
        return soldierBasicInfoResponse;
    }

    @Override
    public BaseResponse<SoldierBasicInfoDTO> getSoldierBasicInfoOfHh(SoldierBasicInfoSearchRequest request) {

        BizCheckUtil.checkNotNull(request, "请求参数不能为空");
        BizCheckUtil.checkIDCardNO(request.getIdCardNo());

        CommonAdminAreaDTO area = commonAdminAreaConsumer.findAdminAreaOfEmployee();

        final BaseResponse<SoldierBasicInfoDTO> soldierBasicInfoResponse =
                soldierBasicInfoConsumer.getSoldierBasicInfo(request.getIdCardNo());
        if (soldierBasicInfoResponse == null) {
            return ResponseUtil.setupFailedResponse(new BaseResponse(), ErrorCodeEnum.COMMON_INNER_ERROR);
        }
        if (soldierBasicInfoResponse.getDto() != null) {
            BizCheckUtil.checkIsTrue(AdminAreaCodeUtils.checkIsFatherArea(area.getId(), soldierBasicInfoResponse.getDto().getResidentAdminAreaCode()),
                    "该用户不属于您所属地区！");
        }
        return soldierBasicInfoResponse;
    }

    @Override
    public BaseResponse<SoldierBasicInfoDTO> getSoldierBasicInfoByCardAndName(BaseApiRequest request) {

        SoldierBasicInfoDTO soldierBasicInfoByCard = soldierBasicInfoConsumer.getSoldierBasicInfoByCard(request.getIdCardNo()).getDto();

        if (soldierBasicInfoByCard == null) {
            return ResponseUtil.buildSuccessResponse(null);
        }


        CommonAdminAreaDTO adminAreaById = adminAreaConsumer.getAdminAreaById(soldierBasicInfoByCard.getResidentAdminAreaCode());
        if (adminAreaById != null) {
            soldierBasicInfoByCard.setAdminAreaFullPath(adminAreaById.getFullValuePath());
        }
        return ResponseUtil.buildSuccessResponse(soldierBasicInfoByCard);
    }

    @Override
    public BaseResponse<SoldierBasicInfoDTO> getSoldierBasicInfoByIdCardNo(BaseApiRequest request) {

        return soldierBasicInfoConsumer.getSoldierBasicInfoByCard(request.getIdCardNo());
    }

//    @Override
//    public BaseResponse<SoldierBasicInfoDTO> getSoldierBasicInfoByCardAndNameAndCheck(BaseApiRequest request) {
//
//        SessionSoldier sessionSoldier = RpcContextUtil.getSessionSoldier();
//        BizCheckUtil.checkNotNull(sessionSoldier, "用户非法");
//
//        SoldierOuterLoginAccountDTO dto = soldierConsumer.getSoldierOuterLoginAccountBySoldierId(sessionSoldier.getUserId()).getDto();
//
//        SoldierBasicInfoDTO soldierBasicInfoByCard = soldierBasicInfoConsumer.getSoldierBasicInfoByCard(request.getIdCardNo()).getDto();
//
//        if (soldierBasicInfoByCard == null) {
//            return ResponseUtil.buildSuccessResponse(null);
//        }
//        if (!soldierBasicInfoByCard.getRealName().equals(dto.getOuterSysNickName())) {
//            log.error("身份采集姓名不符合：dto:{}，soldierBasicInfoByCard:{} ", dto, soldierBasicInfoByCard);
//            return ResponseUtil.buildFailResponse(ErrorCodeEnum.SSH_NAME_NOT_EQUAL);
//        }
//
//
//        CommonAdminAreaDTO adminAreaById = adminAreaConsumer.getAdminAreaById(soldierBasicInfoByCard.getResidentAdminAreaCode());
//        if (adminAreaById != null) {
//            soldierBasicInfoByCard.setAdminAreaFullPath(adminAreaById.getFullValuePath());
//        }
//        return ResponseUtil.buildSuccessResponse(soldierBasicInfoByCard);
//    }



    @Override
    public BaseResponse<String> insertSoldierBasicInfo(final SoldierBasicInfoInsertRequest insertRequest) {


        final BaseResponse<String> baseResponse = new BaseResponse<>();
        serviceTemplate.execute(transactionTemplate, baseResponse, new ServiceCallback() {
            @Override
            public void check() {
                BizCheckUtil.checkNotNull(insertRequest, "新增SoldierBasicInfo的请求参数不能为空");
            }

            @Override
            public void executeService() {
                BaseResponse<String> soldierBasicInfoResponse = soldierBasicInfoConsumer.insertSoldierBasicInfo(insertRequest);
                BeanUtil.copyProperties(soldierBasicInfoResponse, baseResponse);
            }

            @Override
            public ScenarioCodeEnum getScenarioEnum() {
                return ScenarioCodeEnum.SOLDIER_BASIC_INFO_INSERT;
            }
        });
        return baseResponse;
    }


    @Override
    public BaseResponse<Integer> updateSoldierBasicInfo(final SoldierBasicInfoUpdateRequest updateRequest) {


        final BaseResponse<Integer> baseResponse = new BaseResponse<>();
        serviceTemplate.execute(transactionTemplate, baseResponse, new ServiceCallback() {
            @Override
            public void check() {
                BizCheckUtil.checkNotNull(updateRequest, "修改SoldierBasicInfo的请求参数不能为空");
                BizCheckUtil.checkNotBlank(updateRequest.getId(), "id不能为空");
                BizCheckUtil.checkNotBlank(updateRequest.getModifierId(), "操作人不能为空");
                BizCheckUtil.checkNotBlank(updateRequest.getModifierType(), "操作人类型不能为空");
            }

            @Override
            public void executeService() {
                BaseResponse<Integer> soldierBasicInfoResponse = soldierBasicInfoConsumer.updateSoldierBasicInfo(updateRequest);
                BeanUtil.copyProperties(soldierBasicInfoResponse, baseResponse);
            }

            @Override
            public ScenarioCodeEnum getScenarioEnum() {
                return ScenarioCodeEnum.SOLDIER_BASIC_INFO_UPDATE;
            }
        });
        return baseResponse;
    }

    @Override
    public BaseResponse<String> editBasicInfo(SoldierBasicEditRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");

        SessionSoldier sessionSoldier = RpcContextUtil.getSessionSoldier();
        BizCheckUtil.checkNotNull(sessionSoldier, "用户非法");
        request.setSoldierId(sessionSoldier.getUserId());

        return soldierBasicInfoConsumer.editBasicInfo(request);
    }

    @Override
    public BaseResponse<Integer> updateBasicInfoOfYryd(SoldierBasicInfoUpdateRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotBlank(request.getIdCardNo(), "身份证不能为空");
        SessionUtils.buildModifierOfGov(request);

        return soldierBasicInfoConsumer.updateBasicInfoOfYryd(request);
    }


    @Override
    public BaseResponse<Integer> deleteSoldierBasicInfo(final BaseDeleteRequest deleteRequest) {


        final BaseResponse<Integer> baseResponse = new BaseResponse<>();
        serviceTemplate.execute(transactionTemplate, baseResponse, new ServiceCallback() {
            @Override
            public void check() {
                BizCheckUtil.checkNotNull(deleteRequest, "逻辑删除SoldierBasicInfo的请求参数不能为空");
                BizCheckUtil.checkNotBlank((String) deleteRequest.getId(), "id不能为空");
            }

            @Override
            public void executeService() {
                SessionUtils.buildDeleteOfGov(deleteRequest);
                BaseResponse<Integer> soldierBasicInfoResponse = soldierBasicInfoConsumer.deleteSoldierBasicInfo(deleteRequest);
                BeanUtil.copyProperties(soldierBasicInfoResponse, baseResponse);
            }

            @Override
            public ScenarioCodeEnum getScenarioEnum() {
                return ScenarioCodeEnum.SOLDIER_BASIC_INFO_DELETE_LOGICALLY;
            }
        });
        return baseResponse;
    }

    @Override
    public BaseResponse<SoldierBasicInfoDTO> getSoldierBasicInfoById(BaseApiRequest request) {


        BizCheckUtil.checkNotNull(request, "请求不能为空");


        if (Strings.isNotBlank(request.getId())) {
            return soldierBasicInfoConsumer.getSoldierBasicInfoById(request);
        }

        if (Strings.isNotBlank(request.getIdCardNo())) {
            return soldierBasicInfoConsumer.getSoldierBasicInfoByCard(request.getIdCardNo());
        }
        return ResponseUtils.buildSuccessResponse(null);
    }

    @Override
    public BaseResponse<SoldierBasicShortInfoDTO> getSoldierShortInfo(SimpleApiRequest request) {

        return soldierBasicInfoConsumer.getSoldierShortInfo(request.getIdCardNo());
    }

    @Override
    public BasePagingResponse<List<SoldierBasicShortInfoDTO>> searchAreaSoldierShortList(SoldierBasicInfoSearchRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getAdminAreaCode(), "地区不能为空");
        if (request.getPageSize() == 20) {
            request.setPageSize(1000);
        }

        request.setAdminAreaCode(commonAdminAreaConsumer.checkIsChildAdminAreaCode(request.getAdminAreaCode()));
        return soldierBasicInfoConsumer.searchAreaSoldierShortList(request);
    }

    @Override
    public BaseResponse<List<SoldierEmploymentTimeLine>> queryEmploymentLine(SoldierBasicInfoSearchRequest request) {
        return soldierBasicInfoConsumer.queryEmploymentLine(request.getIdCardNo());
    }

    @Override
    public BaseResponse<String> updateSoldierExtraInfoByCardNo(SoldierBasicInfoUpdateRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotBlank(request.getIdCardNo(), "身份证不能为空");
        request.setModifierId(SessionUtils.getGovUserId());
        request.setCollectorId(SessionUtils.getGovUserId());
        request.setModifierType(UserTypeEnum.GOV_EMP_STATION.name());

        return soldierBasicInfoConsumer.updateSoldierExtraInfoByCardNo(request);
    }

    @Override
    public BasePagingResponse<List<SoldierBasicShortInfoDTO>> searchAreaDifficultySoldierShortList(SoldierBasicInfoSearchRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getAdminAreaCode(), "地区不能为空");
        return soldierBasicInfoConsumer.searchAreaDifficultySoldierShortList(request);
    }

    @Override
    public BasePagingResponse<List<SoldierBasicShortInfoDTO>> searchAreaUnemploymentSoldierShortList(SoldierBasicInfoSearchRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getAdminAreaCode(), "地区不能为空");
        return soldierBasicInfoConsumer.searchAreaUnemploymentSoldierShortList(request);
    }

    @Override
    public BaseResponse<String> importNewSoldierInfo() {
        return soldierBasicInfoConsumer.importNewSoldierInfo();
    }

    @Override
    public BaseResponse<String> deleteDeadAndXyjsSoldiers(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request.getUrl(), "url不为空");
        SessionUtils.getGovUserId();
        return soldierBasicInfoConsumer.deleteDeadAndXyjsSoldiers(request);
    }

    @Override
    public BaseResponse<String> setSoldierDead(SimpleApiRequest request) {

        return soldierBasicInfoConsumer.setSoldierDead(request);
    }

    @Override
    public BaseResponse<Integer> addLabels(SoldierBasicInfoUpdateRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getLabels(), "标签不能为空");
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        return soldierBasicInfoConsumer.addLabels(request);
    }

    @Override
    public BaseResponse<String> refreshAllBasicInfo(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        return soldierBasicInfoConsumer.refreshAllBasicInfo(request.getIdCardNo());
    }

    @Override
    public BaseResponse<String> refreshAllTpExtraInfo(SoldierRefresherRequest request) {
        SessionUtils.getGovUserId();

        return soldierBasicInfoConsumer.refreshAllTpExtraInfo(request);
    }

    @Override
    public BaseResponse<String> convertAndSetNewResidentCode(SimpleApiRequest request) {
        return soldierBasicInfoConsumer.convertAndSetNewResidentCode(request.getAdminAreaCode());
    }

    @Override
    public BaseResponse<String> refreshToOriginAdminAreaCode(SimpleApiRequest request) {
        return soldierBasicInfoConsumer.refreshToOriginAdminAreaCode(request.getAdminAreaCode());
    }

    @Override
    public BaseResponse<String> refreshExtraMaxCountInfo(SoldierRefresherRequest request) {
        SessionUtils.getGovUserId();
        return soldierBasicInfoConsumer.refreshExtraMaxCountInfo(request);
    }

    @Override
    public BaseResponse<StatsEmploymentInfo> testCalculate(BaseGetRequest baseGetRequest) {
        return soldierBasicInfoConsumer.testCalculate(baseGetRequest);
    }

    @Override
    public BaseResponse<Integer> setUnemploymentRegistrationTime(SoldierTpAllUpdateRequest soldierTpAllUpdateRequest) {
        return soldierBasicInfoConsumer.setUnemploymentRegistrationTime(soldierTpAllUpdateRequest);
    }

    @Override
    public BaseResponse<StatsEmploymentInfo> dealEmployInfo(SoldierTpAllSearchRequest request) {
        return soldierBasicInfoConsumer.dealEmployInfo(request);
    }

    @Override
    public BaseResponse<String> insertAllSoldier(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request);
        String govUserId = SessionUtils.getGovUserId();
        request.setEmployeeId(govUserId);
        request.setCreatorId(govUserId);
        return soldierBasicInfoConsumer.insertAllSoldier(request);
    }

    @Override
    public BaseResponse<String> exportDetail(SimpleApiRequest request) {
        SessionUtils.getGovUserId();
        return soldierBasicInfoConsumer.exportDetail(request);
    }

    @Override
    public BaseResponse<String> superExportSoldierBasicInfo(SoldierBasicInfoSearchRequest searchRequest) {

        searchRequest.setEmployeeId(SessionUtils.getGovUserId());
        searchRequest.setAdminAreaCode(commonAdminAreaConsumer.checkIsChildAdminAreaCode(searchRequest.getAdminAreaCode()));

        return soldierBasicInfoConsumer.superExportSoldierBasicInfo(searchRequest);
    }

    @Override
    public BaseResponse<ExcelResultBO> queryExportInfo(CommonTmpInfoSearchRequest searchRequest) {

        BizCheckUtil.checkNotNull(searchRequest, "请求不能为空");
        BizCheckUtil.checkNotNull(searchRequest.getDownloadId(), "downloadId不能为空");
        return soldierBasicInfoConsumer.queryExportInfo(searchRequest);
    }

    @Override
    public BaseResponse<String> exportJcCompany(SoldierTpAllSearchRequest searchRequest) {
        return soldierBasicInfoConsumer.exportJcCompany(searchRequest);
    }

    @Override
    public BaseResponse<InsuredEntity> queryInsured(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");


        List<SocialSecurityEntity> dto = soldierBasicInfoConsumer.querySocialSecurity(request.getIdCardNo(), request.getName()).getDto();
        if (!CollectionUtils.isEmpty(dto)) {

            SocialSecurityEntity socialSecurityEntity = getSocialNormalEntityThenFirst(dto);
            InsuredEntity entity = new InsuredEntity();
            entity.setXm(socialSecurityEntity.getAac003());
            entity.setSfzh(socialSecurityEntity.getAac147());
            entity.setDwmc(socialSecurityEntity.getAab004());
            entity.setYbkh(socialSecurityEntity.getAac001());
            entity.setSccbrq(socialSecurityEntity.getAae030());
            entity.setJsrq(socialSecurityEntity.getAae031());
            String aac031 = socialSecurityEntity.getAac031();
            if ("1".equals(aac031)) {
                entity.setYbzxbz("参保缴费");
            } else if ("2".equals(aac031)) {
                entity.setYbzxbz("暂停缴费");
            } else if ("3".equals(aac031)) {
                entity.setYbzxbz("终止缴费");
            } else {
                entity.setYbzxbz("");
            }
            entity.setGwybz(getGwybz(dto));
            entity.setLastPayTime(socialSecurityEntity.getTongTime());
            return ResponseUtils.buildSuccessResponse(entity);
        }
        return ResponseUtils.buildSuccessResponse(new InsuredEntity());
    }

    private SocialSecurityEntity getSocialNormalEntityThenFirst(List<SocialSecurityEntity> dto) {
        for (SocialSecurityEntity socialSecurityEntity : dto) {
            if ("1".equals(socialSecurityEntity.getAac031())) {
                return socialSecurityEntity;
            }
        }
        return dto.get(0);
    }

    private String getGwybz(List<SocialSecurityEntity> dto) {
        for (SocialSecurityEntity socialSecurityEntity : dto) {
            if ("机关事业单位养老保险".equals(socialSecurityEntity.getAae140())) {
                return "是";
            }
        }
        return "否";
    }

    @Override
    public BaseResponse<List<InsuredInfoEntity>> queryInusreList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryInusreList(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<SocialSecurityEntity>> querySocialSecurity(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.querySocialSecurity(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<EducationEntity>> queryEducationList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryEducationList(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<SubsistenceEntity> querySubsistence(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return ResponseUtils.buildSuccessPagingResponse(null);
    }

    @Override
    public BaseResponse<List<SubsistenceAllowanceEntity>> querySubsistenceAllowance(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.querySubsistenceAllowance(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<LowSideEntity>> queryLowSide(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryLowSide(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<ExtremelyPoorEntity>> queryExtremelyPoor(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryExtremelyPoor(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<UnemploymentRegistrationEntity>> queryUnemploymentRegistration(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryUnemploymentRegistration(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<EffectiveJudgmentEntity>> queryEffectiveJudgmentList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryEffectiveJudgmentList(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<MedicalInsuranceConsumptionEntity> queryMedicalInsuranceConsume(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryMedicalInsuranceConsume(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<SoldierDisabledInfoDTO> getSoldierDisabledInfo(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierDisabledInfoConsumer.getSoldierDisabledInfo(request.getIdCardNo());
    }

    @Override
    public BaseResponse<DisabledEntity> queryDisabledInfo(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryDisabledInfo(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<CarEntity>> queryCarList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryCarList(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<ShareholderEntity>> queryShareholderList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryShareholderList(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<EnterpriseInfoEntity>> queryEnterpriseList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryEnterpriseList(request.getUniscId());
    }

    @Override
    public BaseResponse<List<HouseEntity>> queryHouseList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryHouseList(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<UntrustworthyEntity>> queryUntrustworthy(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryUntrustworthy(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<CommunityCorrectionEntity>> queryCommunityCorrectionList(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryCommunityCorrectionList(request.getIdCardNo());
    }

    @Override
    public BaseResponse<List<HuKouEntity>> queryHuKouInfo(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(RpcContextUtil.getSessionGovEmployee(), "用户非法");

        return soldierBasicInfoConsumer.queryHuKouInfo(request.getIdCardNo());
    }

    @Override
    public BaseResponse<HouseholdRegistrationEntity> queryHouseholdRegistrationInfo(BaseApiRequest request) {

        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkNotNull(request.getName(), "姓名不能为空");

        return soldierBasicInfoConsumer.queryHouseholdRegistrationInfo(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<MaritalInfoEntity>> queryMaritalInfo(BaseApiRequest request) {


        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkNotNull(request.getName(), "姓名不能为空");
        SoldierBasicInfoDTO dto = soldierBasicInfoConsumer.getSoldierBasicInfoByCard(request.getIdCardNo()).getDto();
        String gender = "M";
        if (dto != null) {
            gender = dto.getGender().startsWith("M") ? "M" : "F";
        }
        return soldierBasicInfoConsumer.queryMaritalInfo(request.getIdCardNo(), request.getName(), gender);
    }

    @Override
    public BaseResponse<List<FloatingPopulationEntity>> queryFloatingPopulationList(BaseApiRequest request) {

        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkNotNull(request.getName(), "姓名不能为空");

        return soldierBasicInfoConsumer.queryFloatingPopulationList(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<ProvidentFundEntity>> queryProvidentFund(BaseApiRequest request) {

        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkNotNull(request.getName(), "姓名不能为空");

        return soldierBasicInfoConsumer.queryProvidentFund(request.getIdCardNo(), request.getName());
    }

    @Override
    public BaseResponse<List<SoldierPetitionInfoDTO>> getSoldierPetitionInfoByIdCardNo(BaseApiRequest request) {

        BizCheckUtil.checkNotNull(request);
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");

        return soldierBasicInfoConsumer.getSoldierPetitionInfoByIdCardNo(request.getIdCardNo());
    }

    @Override
    public BaseResponse<?> superBasicInfo(BaseApiRequest request) {
        BizCheckUtil.checkNotNull(request.getType(), "类型不能为空");
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkEqual(request.getKey(), "ssyspky");

        switch (request.getType()) {
            case "CBXX":
                return soldierBasicInfoConsumer.queryInsured(request.getIdCardNo());
            case "SBJL":
                return soldierBasicInfoConsumer.queryInusreList(request.getIdCardNo(), request.getName());
            case "XL":
                return soldierBasicInfoConsumer.queryEducationList(request.getIdCardNo(), request.getName());
            case "YBXFXX":
                return soldierBasicInfoConsumer.queryMedicalInsuranceConsume(request.getIdCardNo(), request.getName());
            case "CL":
                return soldierBasicInfoConsumer.queryCarList(request.getIdCardNo());
            case "GDXX":
                return soldierBasicInfoConsumer.queryShareholderList(request.getIdCardNo());
            case "FCXX":
                return soldierBasicInfoConsumer.queryHouseList(request.getIdCardNo(), request.getName());
            case "SXR":
                return soldierBasicInfoConsumer.queryUntrustworthy(request.getIdCardNo(), request.getName());
            case "SQZZ":
                return soldierBasicInfoConsumer.queryCommunityCorrectionList(request.getIdCardNo());
            case "HJXX":
                return soldierBasicInfoConsumer.queryHouseholdRegistrationInfo(request.getIdCardNo(), request.getName());
            case "LDRK":
                return soldierBasicInfoConsumer.queryFloatingPopulationList(request.getIdCardNo(), request.getName());
            case "WLXSXPJ":
                return soldierBasicInfoConsumer.queryEffectiveJudgmentList(request.getIdCardNo(), request.getName());
            case "HY":
                String gender = request.getGender().startsWith("M") ? "M" : "F";
                return soldierBasicInfoConsumer.queryMaritalInfo(request.getIdCardNo(), request.getName(), gender);
            case "GJJ":
                return soldierBasicInfoConsumer.queryProvidentFund(request.getIdCardNo(), request.getName());
            case "HUKOU":
                return soldierBasicInfoConsumer.queryHuKouInfo(request.getIdCardNo());
            case "HUKOUBEN":
                return soldierBasicInfoConsumer.queryHuKouBen(request.getIdCardNo());
            default:
                return ResponseUtils.buildSuccessResponse(new Object());
        }
    }

    @Override
    public BaseResponse<List<EnterpriseInfoEntity>> queryEnterpriseListByName(SimpleApiRequest request) {

        return soldierBasicInfoConsumer.queryEnterpriseListByName(request.getName());
    }

    @Override
    public BaseResponse<List<EnterpriseCreditRatingEntity>> queryEnterpriseCreditRating(SimpleApiRequest request) {

        return soldierBasicInfoConsumer.queryEnterpriseCreditRating(request.getName());
    }

    @Override
    public BaseResponse<List<ShareholderEntity>> isMilitaryEnterprise(SimpleApiRequest request) {

        return soldierBasicInfoConsumer.isMilitaryEnterprise(request.getId());
    }

    @Override
    public BaseResponse<String> checkStudent() {

        return soldierBasicInfoConsumer.checkStudent();
    }

    @Override
    public BaseResponse<String> insertSoldierTpALLInTestTable(SoldierTpAllInsertRequest soldierTpAllInsertRequest) {

        return soldierBasicInfoConsumer.insertSoldierTpALLInTestTable(soldierTpAllInsertRequest);
    }


    @Override
    public BaseResponse<String> batchInsert(PetitionInsertRequest request) {

        return soldierBasicInfoConsumer.batchInsert(request.getPetitionList());
    }

    @Override
    public BaseResponse<String> batchInsertXfData(PetitionInsertRequest requests) {

        return soldierBasicInfoConsumer.batchInsertXfData(requests.getYhqXfList());
    }

    @Override
    public BaseResponse<Integer> fixResidentAdminAreaCode(SoldierBasicInfoUpdateRequest request) {

        return soldierBasicInfoConsumer.fixResidentAdminAreaCode(request);
    }

    @Override
    public BaseResponse<Integer> updateLatestSocialTime(SoldierTpAllUpdateRequest soldierTpAllUpdateRequest) {
        return soldierBasicInfoConsumer.updateLatestSocialTime(soldierTpAllUpdateRequest);
    }

    @Override
    public BaseResponse<Integer> fixBirthday(SoldierBasicInfoUpdateRequest request) {
        return soldierBasicInfoConsumer.fixBirthday(request);
    }

    @Override
    public BaseResponse<SoldierTokenDTO> obtainJxAuth(SoldierTokenRequest request) {

        request.setSoldierId(SessionUtils.getSoldierUserId());
        return soldierBasicInfoConsumer.obtainJxAuth(request);
    }

    @Override
    public BaseResponse<Boolean> sendJxActivityInfo(SoldierJxSendMessageRequestRequest request) {
        System.out.println(request);

//        return commonAliShhConsumer.sendActivityJx(request.getIdCardList(), request.getTitle(), request.getMsg());
        return null;
    }

    @Override
    public BaseResponse<String> insertCommonSmsPool(CommonSmsPoolInsertRequest request) {
        request.setAdminAreaCode(commonAdminAreaConsumer.checkIsChildAdminAreaCode(request.getAdminAreaCode()));

        return soldierBasicInfoConsumer.insertCommonSmsPool(request);
    }

    @Override
    public BaseResponse<List<CommonSmsPoolDTO>> listByAreaUsed(CommonSmsPoolSearchRequest request) {


        BizCheckUtil.checkNotNull(request, "查询分页CommonSmsPool的请求参数不能为空");
        BizCheckUtil.checkNotNull(request.getAdminAreaCode(), "查询分页CommonSmsPool的请求参数不能为空");
        return soldierBasicInfoConsumer.listByAreaUsed(request);
    }

    @Override
    public BaseResponse<Integer> setAsUsed(CommonSmsPoolUpdateRequest updateRequest) {

        BizCheckUtil.checkNotNull(updateRequest, "修改CommonSmsPool的请求参数不能为空");
        BizCheckUtil.checkNotBlank(updateRequest.getId(), "id不能为空");
        return soldierBasicInfoConsumer.setAsUsed(updateRequest);
    }

    @Override
    public BaseResponse<List<SoldierBasicInfoDTO>> listSoldierBasicInfoByCard(BaseApiRequest request) {
        CommonAdminAreaDTO adminAreaOfEmployee = adminAreaConsumer.findAdminAreaOfEmployee();
        String adminCode = adminAreaOfEmployee.getId();

        return soldierBasicInfoConsumer.listSoldierBasicInfoByCondition(request.getCondition(), adminCode);
    }

    @Override
    public BaseResponse<SoldierBasicCheckInfoDTO> checkIsSoldier(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");

        BaseResponse<SoldierBasicCheckInfoDTO> soldierBasicCheckInfoDTOBaseResponse = soldierBasicInfoConsumer.checkIsSoldier(request.getIdCardNo());
        try {
            SoldierBasicCheckInfoDTO dto = soldierBasicCheckInfoDTOBaseResponse.getDto();
            if (dto != null) {
                if (Boolean.TRUE.equals(dto.getIsSoldier())) {
                    ScanCodeRecordInsertRequest recordInsertRequest = new ScanCodeRecordInsertRequest();
                    recordInsertRequest.setName(dto.getRealName());
                    recordInsertRequest.setSoldierId(dto.getIdCardNo());
                    recordInsertRequest.setIdCardNo(dto.getIdCardNo());
                    recordInsertRequest.setType(RecordTypeEnum.HOSPITAL.name());
                    String info = request.getInfo();
                    if (Strings.isBlank(info)) {
                        info = "红会医院";
                    }
                    recordInsertRequest.setBizId(info);
                    recordInsertRequest.setBizName(info);

                    boolean b = redisLock.tryLock(hospitalLockPrefix + request.getIdCardNo() + ":" + info, 1000 * 60 * 60);
                    if (b) {
                        scanCodeRecordConsumer.insertScanCodeRecord(recordInsertRequest);
                    }
                }
            }
        } catch (Exception e) {
            log.info("插入error：{}", e);
        }
        return soldierBasicCheckInfoDTOBaseResponse;
    }

    @Override
    public BaseResponse<SoldierBasicCheckInfoDTO> checkIsYhSoldier(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkNotNull(request.getInfo(), "info不能为空");

        BaseResponse<SoldierBasicCheckInfoDTO> soldierBasicCheckInfoDTOBaseResponse = soldierBasicInfoConsumer.checkIsSoldier(request.getIdCardNo());
        if (soldierBasicCheckInfoDTOBaseResponse.getDto() == null) {
            return soldierBasicCheckInfoDTOBaseResponse;
        }

        SoldierBasicCheckInfoDTO infoDTOBaseResponseDto = soldierBasicCheckInfoDTOBaseResponse.getDto();
        if (infoDTOBaseResponseDto.getIsSoldier().equals(true) && infoDTOBaseResponseDto.getResidentAdminAreaCode().startsWith("330110")) {
            try {
                SoldierBasicCheckInfoDTO dto = soldierBasicCheckInfoDTOBaseResponse.getDto();
                if (dto != null) {
                    if (Boolean.TRUE.equals(dto.getIsSoldier())) {
                        ScanCodeRecordInsertRequest recordInsertRequest = new ScanCodeRecordInsertRequest();
                        recordInsertRequest.setName(dto.getRealName());
                        recordInsertRequest.setSoldierId(dto.getIdCardNo());
                        recordInsertRequest.setType(RecordTypeEnum.HOSPITAL.name());
                        String info = request.getInfo();
                        recordInsertRequest.setBizId(info);
                        recordInsertRequest.setBizName(info);

                        scanCodeRecordConsumer.insertScanCodeRecord(recordInsertRequest);
                    }
                }
            } catch (Exception e) {
                log.info("插入error：{}", e);
            }
            return soldierBasicCheckInfoDTOBaseResponse;
        } else {

            return new BaseResponse<>(true, new SoldierBasicCheckInfoDTO(false));
        }
    }

    @Override
    public BaseResponse<SoldierBasicCheckInfoDTO> checkIsScSoldierAndNotXy(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getIdCardNo(), "身份证不能为空");
        BizCheckUtil.checkNotNull(request.getInfo(), "info不能为空");

        BaseResponse<SoldierBasicCheckInfoDTO> soldierBasicCheckInfoDTOBaseResponse = soldierBasicInfoConsumer.checkIsSoldier(request.getIdCardNo());
        if (soldierBasicCheckInfoDTOBaseResponse.getDto() == null) {
            return soldierBasicCheckInfoDTOBaseResponse;
        }

        SoldierBasicCheckInfoDTO infoDTOBaseResponseDto = soldierBasicCheckInfoDTOBaseResponse.getDto();
        if (infoDTOBaseResponseDto.getIsSoldier().equals(true) && infoDTOBaseResponseDto.getResidentAdminAreaCode().startsWith("330102")
                && checkIsNotXyjrjs(infoDTOBaseResponseDto)) {
            try {
                SoldierBasicCheckInfoDTO dto = soldierBasicCheckInfoDTOBaseResponse.getDto();
                if (dto != null) {
                    if (Boolean.TRUE.equals(dto.getIsSoldier())) {
                        ScanCodeRecordInsertRequest recordInsertRequest = new ScanCodeRecordInsertRequest();
                        recordInsertRequest.setName(dto.getRealName());
                        recordInsertRequest.setSoldierId(dto.getIdCardNo());
                        recordInsertRequest.setType(RecordTypeEnum.HOSPITAL.name());
                        String info = request.getInfo();
                        recordInsertRequest.setBizId(info);
                        recordInsertRequest.setBizName(info);

                        scanCodeRecordConsumer.insertScanCodeRecord(recordInsertRequest);
                    }
                }
            } catch (Exception e) {
                log.info("插入error：{}", e);
            }
            return soldierBasicCheckInfoDTOBaseResponse;
        } else {

            return new BaseResponse<>(true, new SoldierBasicCheckInfoDTO(false));
        }
    }

    private boolean checkIsNotXyjrjs(SoldierBasicCheckInfoDTO dto) {
        String soldierType = dto.getSoldierType();
        if (Strings.isBlank(soldierType)) {
            return true;
        }

        String xyjrjs = "现役军人家属";
        if (xyjrjs.equals(soldierType)) {
            return false;
        }
        String[] split = soldierType.replace("，", ",").split(",");
        HashSet<String> strings = Sets.newHashSet(split);
        strings.remove(xyjrjs);
        dto.setSoldierType(String.join(",", strings));
        return true;
    }

    @Override
    public BaseResponse<SoldierBasicCheckInfoDTO> checkIsSoldierByMobile(SimpleApiRequest request) {

        BizCheckUtil.checkNotNull(request, "请求不能为空");
        BizCheckUtil.checkNotNull(request.getMobile(), "身份证不能为空");

        BaseResponse<SoldierBasicCheckInfoDTO> soldierBasicCheckInfoDTOBaseResponse = soldierBasicInfoConsumer.checkIsSoldierByMobile(request.getMobile());
        try {
            SoldierBasicCheckInfoDTO dto = soldierBasicCheckInfoDTOBaseResponse.getDto();
            if (dto != null) {
                if (Boolean.TRUE.equals(dto.getIsSoldier())) {
                    ScanCodeRecordInsertRequest recordInsertRequest = new ScanCodeRecordInsertRequest();
                    recordInsertRequest.setName(dto.getRealName());
                    recordInsertRequest.setSoldierId(dto.getIdCardNo());
                    recordInsertRequest.setType(RecordTypeEnum.HOSPITAL.name());
                    String info = request.getInfo();
                    recordInsertRequest.setBizId(info);
                    recordInsertRequest.setBizName(info);

                    scanCodeRecordConsumer.insertScanCodeRecord(recordInsertRequest);
                }
            }
        } catch (Exception e) {
            log.info("插入error：{}", e);
        }
        return soldierBasicCheckInfoDTOBaseResponse;
    }

    @Override
    public BaseResponse<Integer> importSyfInfoToBasicDb(SimpleApiRequest request) {

        SessionUtils.getGovUserId();
        return soldierBasicInfoConsumer.importSyfInfoToBasicDb(request);
    }

    @Override
    public BaseResponse<Integer> encAllTable(SimpleApiRequest request) {

        SessionUtils.getGovUserId();
        return soldierBasicInfoConsumer.encAllTable(request);
    }

    @Override
    public BaseResponse<String> exportHouseHoldInfo(SimpleApiRequest request) {

        SessionUtils.getGovUserId();
        return soldierBasicInfoConsumer.exportHouseHoldInfo(request);
    }

    @Override
    public BasePagingResponse<List<SoldierBasicOpenInfoDTO>> searchOpenBasicInfo2(final SoldierBasicInfoSearchRequest soldierBasicInfoSearchRequest) {

        soldierBasicInfoSearchRequest.setAdminAreaCode("330105000000");
        return soldierBasicInfoConsumer.searchOpenBasicInfo2(soldierBasicInfoSearchRequest);
    }

    @Override
    public BaseResponse<Boolean> updateSoldierBasicInformation(SoldierBasicInformationUpdateRequest request) {
        return soldierBasicInfoConsumer.updateSoldierBasicInformation(request);
    }
}
